<?php if (!defined('THINK_PATH')) exit();?>﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- start: include -->
		<!-- start: include jquery & jquery ui -->
		<link type="text/css" href="<?php echo ($SITE_URL); ?>/public/jquery-ui-1.8.16/css/ui-lightness/jquery-ui-1.8.16.custom.css" rel="stylesheet" />	
		<script type="text/javascript" src="<?php echo ($SITE_URL); ?>/public/jquery-ui-1.8.16/js/jquery-1.6.2.min.js"></script>
		<script type="text/javascript" src="<?php echo ($SITE_URL); ?>/public/jquery-ui-1.8.16/js/jquery-ui-1.8.16.custom.min.js"></script>
        <script type="text/javascript" src="<?php echo ($SITE_URL); ?>/public/jquery-ui-1.8.16/js/jquery-ui-timepicker-addon.js"></script>
        <!-- end:   include jquery & jquery ui -->
        <!-- start: include super-fish menu jquery plugin -->
        <link type="text/css" href="<?php echo ($SITE_URL); ?>/public/superfish-1.4.8/css/superfish.css" rel="stylesheet" />	
		<script type="text/javascript" src="<?php echo ($SITE_URL); ?>/public/superfish-1.4.8/js/superfish.js"></script>
        <!-- end: include super-fish menu jquery plugin -->
        
        
        <!-- start: include jack's css & js -->
        
        <link type="text/css" href="<?php echo ($SITE_URL); ?>/public/jack/foradmin/css/common.css" rel="stylesheet" />
        
        
        <!-- end:   include jack's css & js -->
<!-- end: include -->

        
<title><?php echo ($msg["title"]); ?></title>
</head>
<body>

<div id="header">

<div id="header_left"><img src="<?php echo ($SITE_URL); ?>/public/jack/foradmin/images/logo.jpg" /></div>

 <div id="header_right">
        <div id="header_right_control">Welcome back, <?php echo ($user["user_name"]); ?> / <a href="<?php echo ($SITE_URL); ?>/admin.php?s=Public/logout">Logout</a> 
        </div>
        <div id="header_right_menu">
            <ul class="sf-menu">
            				<li>
                  <a href="<?php echo ($SITE_URL); ?>/biz.php">My world</a>
                 </li>
                 <li> 
                     <a href="#">Messenge &amp; Condition</a>
                  </li>
                  <li>   
                     <a href="<?php echo ($SITE_URL); ?>/biz.php?s=Product/index">My Products</a>
                   </li>
                   <?php /* ?>
                   <li> 
                     <a href="<?php echo ($SITE_URL); ?>/biz.php?s=Index/company">Company</a>
                   </li> 
                   <?php //*/ ?>
                   <li>
                     <a href="<?php echo ($SITE_URL); ?>/biz.php?s=Index/account">Account</a>
                   </li>
                   <!--
                   <li>
                     <a href="#">Service Package</a>
                   </li>
                   -->
                   <li> 
                     <a href="<?php echo ($SITE_URL); ?>/biz.php?s=Index/fraud">Fraud Report</a>
                	 </li>
                  <li>
                			<a href="<?php echo ($SITE_URL); ?>/admin.php">Go To admin account(for test only)</a>
                </li>
            </ul>
          </div>           
    </div>
    
</div>

<div id="wrapper">
<script charset="utf-8" src="/editor/kindeditor.js"></script>
<script charset="utf-8" src="/editor/lang/zh_CN.js"></script>
<script>
	var editor;
	KindEditor.ready(function(K) {
			editor = K.create('#description',{
					langType : 'en'
				});
	});
		
	function form_check(){
		if($("#product_name_id").val()==""){
			alert("Title can not empty!");
			return false;
		}
		return true;
	}
	
	$(document).ready(function(){
		$(function() {
			$( "#time_expire" ).datepicker({ dateFormat: 'yy-mm-dd' });
		});
	});
	//time_expire
</script>

     <div id="content_left">
    		<div class="out_box">
         <h3>Quick Access</h3>
         
         <ul class="quick_links">
         
        
         
            <li><a href="">Check  Messages</a></li>
            <li><a href="<?php echo ($SITE_URL); ?>/biz.php?s=Product/index">Display New Products</a></li>
       
   
            <li><a href="<?php echo ($SITE_URL); ?>/biz.php?s=Index/account">My Account</a></li>
          
           
         		<li><a href=" <?php echo ($SITE_URL); ?>">Go to Index</a></li>
         
         </ul>
     </div>     
         <!--
       <div class="out_box">
              
             <h5 class="schedule">Schedule       		  <a class="btn_s fr"  href="<?php echo ($SITE_URL); ?>/biz.php?s=Schedule/task_add"><span>Add ++</span></a></h5>
       
             
                   
                      <table class="schedule_table">
                       <thead>
                           <tr>
                               <th colspan="2" style="text-align:left; ">Today</th>
                              </tr>
                          </thead>
                       <tbody>
                          <?php if(is_array($data["tb_task_today"])): foreach($data["tb_task_today"] as $key=>$vo): ?><tr>
                                  <td><?php echo ($vo["time"]); ?></td>
                                  <td><a href="<?php echo ($SITE_URL); ?>/biz.php?s=Schedule/task_update/task_id/<?php echo ($vo["task_id"]); ?>"><?php echo ($vo["title"]); ?></a></td>
                              </tr><?php endforeach; endif; ?>
                   
                           <tr>
                               <th colspan="2"  style="text-align:left;" >Tomorrow</th>
                              </tr>
                     
                          <?php if(is_array($data["tb_task_tomorrow"])): foreach($data["tb_task_tomorrow"] as $key=>$vo): ?><tr>
                                  <td><?php echo ($vo["time"]); ?></td>
                                  <td><a href="<?php echo ($SITE_URL); ?>/biz.php?s=Schedule/task_update/task_id/<?php echo ($vo["task_id"]); ?>"><?php echo ($vo["title"]); ?></a></td>
                              </tr><?php endforeach; endif; ?>
                    
                           <tr>
                               <th colspan="2"  style="text-align:left; ">Next Week</th>
                              </tr>
                      
                          <?php if(is_array($data["tb_task_nextweek"])): foreach($data["tb_task_nextweek"] as $key=>$vo): ?><tr>
                                  <td><?php echo ($vo["time"]); ?></td>
                                  <td><a href="<?php echo ($SITE_URL); ?>/biz.php?s=Schedule/task_update/task_id/<?php echo ($vo["task_id"]); ?>"><?php echo ($vo["title"]); ?></a></td>
                              </tr><?php endforeach; endif; ?>
                          </tbody>
                      </table>
                      
                           
                      
               
               </div>   
         -->
         
      <div class="out_box">   
      			<img src="<?php echo ($SITE_URL); ?>/public/jack/foradmin/images/professional2.jpg"  width="180" />
      <!--
      			<img src="<?php echo ($SITE_URL); ?>/public/jack/foradmin/images/star.png"  />
         -->
         <p style="color:#069; font-weight:bold; ">Different serice package will heko you get best benefit in the shortest time and lowest cost.</p>
         
         <a href="" style="cursor:default;" class="btn1 r3"><span class="r3">Coming Soon</span></a><br />
								<!--
         <a href=""><strong>Learn More >></strong></a>        
         -->
       </div>
       
    </div> 

<div id="content">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>
      <div style='float:right;padding-right:8px;'>
        <!--  //保留接口  -->
      </div></td>
  </tr>
  <tr>
    <td height="1" style='padding:0px'></td>
  </tr>
</table>

<h2>Add New Product</h2>
<form id="add_cat" name="add_cat" method="post" action="#" enctype="multipart/form-data"  onsubmit="return form_check();" >
<table class="list_table"  width="98%" align="center" border="0" cellpadding="3" cellspacing="1" >

    <tr >
    <td width="18%"><div align="right">Type&nbsp; </div></td>
    <td width="82%">
      <select name="type" id="type">
         <option value="1" <?php if(($_GET['type'])  ==  "1"): ?>selected="selected"<?php endif; ?>>Supply</option>
         <option value="2" <?php if(($_GET['type'])  ==  "2"): ?>selected="selected"<?php endif; ?>>Demand</option>
      </select>	
 	</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="18%"><div align="right">Product Name&nbsp; </div></td>
    <td width="82%"><input name="name" id="product_name_id" type="text" size="30"/>&nbsp; <font color="#FF0000">*</font></td>
  </tr>
  <tr bgcolor="#FFFFFF" style="display:none;">
    <td width="18%"><div align="right">User ID&nbsp; </div></td>
    <td width="82%">
		<input name="user_id" value="" /> Auto fill the current user id if leave empty
    </td>
  </tr>

  <tr bgcolor="#FFFFFF">
    <td width="18%"><div align="right">Category&nbsp; </div></td>
    <td width="82%">
	<select name="cat_id" id="cat_id">
	  <?php if(is_array($categoty)): $i = 0; $__LIST__ = $categoty;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$data): ++$i;$mod = ($i % 2 )?><option value="<?php echo ($key); ?>"><?php echo ($data); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
	</select>	</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="18%"><div align="right">Region&nbsp; </div></td>
    <td width="82%">
	<select name="location_code" id="location_code_id">
	  <?php if(is_array($all_regions)): foreach($all_regions as $key=>$vo): ?><option value="<?php echo ($vo["region_code"]); ?>"><?php echo ($vo["region_country"]); ?>/<?php echo ($vo["region_province"]); ?></option><?php endforeach; endif; ?>
	</select>	</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="18%"><div align="right">Image&nbsp; </div></td>
    <td width="82%">
    	<input name="image[]" type="file" size="30"/>&nbsp;
    	<label>Max Width:</label><input type="text" name="thumbMaxWidth" id="thumbMaxWidth" size="10" value="" />&nbsp;
        <label>Max Height:</label><input type="text" name="thumbMaxHeight" id="thumbMaxHeight" size="10" value="" /><br />
        <input name="image[]" type="file" size="30"/><br />
        <input name="image[]" type="file" size="30"/><br />
        <input name="image[]" type="file" size="30"/><br />
        <input name="image[]" type="file" size="30"/><br />
        <input name="image[]" type="file" size="30"/><br />
    </td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="18%"><div align="right">Price&nbsp; </div></td>
    <td width="82%"><input name="price" type="text" size="15"/>&nbsp;</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td width="18%"><div align="right">Quantity&nbsp; </div></td>
    <td width="82%"><input name="quantity" type="text" size="15"/>&nbsp;</td>
  </tr>
  <tr bgcolor="#FFFFFF">
        <td width="18%"><div align="right">Description &nbsp; </div></td>
        <td width="82%"><textarea name="description" id="description" style="width:700px;height:200px;visibility:hidden;"></textarea></td>
    </tr>
    <tr bgcolor="#FFFFFF">
        <td width="18%"><div align="right">Expire at: &nbsp; </div></td>
        <td width="82%"><input name="time_expire" id="time_expire" type="text" size="15" value="<?php echo ($DATE_NOW); ?>"/></td>
    </tr>
   
  <tr bgcolor="#FFFFFF">
    <td colspan="2">
	<div align="center">
    		<input type="submit" name="Submit" value="Add"> 
			<input type="reset" name="chongzhi" value="Reset">
	</div>
	</td>
  </tr>
</table>
</form>
</div>
</div> <!-- wrapper -->

<div id="footer">
		<div class="w960">
  
  <div class="foot_bar">
  					<a href="<?php echo ($SITE_URL); ?>/index.php/Page/index/id/12">About Us</a> | 
       <a href="<?php echo ($SITE_URL); ?>/index.php/Page/index/id/13">Contact us</a> | 
       <a href="<?php echo ($SITE_URL); ?>/index.php/Page/index/id/14">Frequently asked questions</a> | 
       <a href="<?php echo ($SITE_URL); ?>/index.php/Page/index/id/15">Terms & Conditions</a> | 
       <a href="<?php echo ($SITE_URL); ?>/index.php/Page/index/id/16">Privacy Policy</a> 
  
  </div>
  
  
      <p style="color:#999; font-size:11px; text-align:center; ">Copyright &copy; 2011 Comtoworld.com  Limited and licensors. All rights reserved. </p>
  

  </div><!-- EO w960 -->
</div><!-- EO footer -->

</body>
</html>